@import '../../../styles/variable.less';

.@{prefixCls}-switch-wrapper {
  display: inline-flex;
  align-items: center;

  .@{prefixCls}-switch {
    position: relative;
    display: inline-block;

    .@{prefixCls}-switch-checkbox {
      position: absolute;
      z-index: 2;
      width: 100%;
      height: 100%;
      margin: 0;
      cursor: pointer;
      appearance: none;
    }

    .@{prefixCls}-switch-core {
      position: relative;
      width: 42px;
      height: 22px;
      background: #a7aaa6;
      border-radius: 22px;

      &::after {
        position: absolute;
        top: 1px;
        left: 1px;
        width: 20px;
        height: 20px;
        background-color: #fff;
        border-radius: 50%;
        transition: all 0.3s;
        content: '';
      }

      &.is-checked {
        background-color: #1989fa;

        &::after {
          transform: translateX(20px);
        }
      }
    }
  }
}
